package vn.edu.hcmut.cse.ai.search.problems.npuzzle;

import vn.edu.hcmut.cse.ai.infrastructure.GoalTest;

public class NPuzzleGoalTest implements GoalTest {

    private final NPuzzleState goalState;

    public NPuzzleGoalTest(NPuzzleState goalState) {
        this.goalState = goalState;
    }

    @Override
    public boolean isGoalState(Object state) {
        NPuzzleState npuzzleState = (NPuzzleState) state;

        return npuzzleState.equals(this.goalState);
    }

    @Override
    public Object getGoalState() {
        return this.goalState;
    }
}
